/*
 * @Author: chenbolin@msn.cn
 * @Date: 2023-08-29 15:33:17
 * @LastEditors: chenbolin@msn.cn
 * @LastEditTime: 2023-10-25 14:45:17
 * @FilePath: \Remote\src\App\Button.c
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
 */
#include "Button.h"
#include "Sys.h"
// #include "SysButton.h"

static const uint8_t BUTTON_PIN[BUTTON_ID_COUNT] = {
    HAL_PIN_KEY_EMERGENCY_STOP,
    HAL_PIN_KEY_ENGINE_START,
    HAL_PIN_KEY_ENGINE_STOP,
    HAL_PIN_KEY_LIGHTING,
    HAL_PIN_KEY_HORN,
    HAL_PIN_KEY_SPEED_MODE
};

ButtonStatus_t ButtonGetState(ButtonID_t bid)
{
    return (ButtonStatus_t)HalGPIOGetLevel(BUTTON_PIN[bid]);
}
